<template>
    <title-box title="设备基本信息">
        <div class="x-content-inner">
            <!-- 基本信息 -->
            <ul class="x-basic-info">
                <li>
                    <span>序列号</span>
                    <p>{{ props.devices.no }}</p>
                </li>
                <li>
                    <span>设备编号</span>
                    <p>{{ props.devices.code }}</p>
                </li>
                <li>
                    <span>出厂日期</span>
                    <p>{{ props.devices.productionDate }}</p>
                </li>
                <li>
                    <span>有效期</span>
                    <p>{{ props.devices.shelfLife }}月</p>
                </li>
                <li>
                    <span>设备类型</span>
                    <p>
                        <a-tag v-if="props.devices.status === 0" color="processing">正常</a-tag>
                        <a-tag v-if="props.devices.status === 1" color="warning">告警</a-tag>
                        <a-tag v-if="props.devices.status === 2" color="error">离线</a-tag>
                    </p>
                </li>
            </ul>
        </div>
    </title-box>
</template>
<script setup>
const props = defineProps({
    devices: {
        type: Object,
        default: () => {
            return {}
        }
    }
})
</script>
